﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Demo.FolderOp
{
    public partial class MainWindows : Form
    {
        public MainWindows()
        {
            InitializeComponent();
        }

        private void btnCopyOperator_Click(object sender, EventArgs e)
        {
            this.Hide();
            FileCopy myCopyFiles = new FileCopy();
            DialogResult result = myCopyFiles.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.Cancel)
            {
                //返回上一级
                this.Show();
            }
            else if (result == System.Windows.Forms.DialogResult.Abort)
            {
                //中断操作，关闭程序
                this.Close();
            }
        }

        private void btnRenameOperator_Click(object sender, EventArgs e)
        {
            FileRename myFileRename = new FileRename();
            myFileRename.ShowDialog();
        }

        private void btnFolderQuery_Click(object sender, EventArgs e)
        {
            FolderOperator myRenameFiles = new FolderOperator();
            myRenameFiles.ShowDialog();
        }

        // 小说操作
        private void btnNovelOperate_Click(object sender, EventArgs e)
        {
            NovelOperate myNovel = new NovelOperate();
            myNovel.ShowDialog();
        }

        // 图片操作
        private void btnImgOperate_Click(object sender, EventArgs e)
        {
            IMGOperate myIMG = new IMGOperate();
            myIMG.ShowDialog();
        }

        private void btnContentSubstring_Click(object sender, EventArgs e)
        {
            // TextContentOperate内容截取
            TextContentOperate myContent = new TextContentOperate();
            myContent.ShowDialog();
        }

        private void btnSameTypeCopy_Click(object sender, EventArgs e)
        {
            this.Hide();
            FileTypeCopy myCopyFiles = new FileTypeCopy();
            DialogResult result = myCopyFiles.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.Cancel)
            {
                //返回上一级
                this.Show();
            }
            else if (result == System.Windows.Forms.DialogResult.Abort)
            {
                //中断操作，关闭程序
                this.Close();
            }
        }
    }
}
